a = int(input())
n = int(input())
s = 0
t = a
for _ in range(n):
    s += t
    t = t * 10 + a
print(s)